package zhu.areas.team.service;

import java.util.List;

import zhu.areas.team.dao.ITeamZhDAO;
import zhu.areas.team.data.Team;
import zhu.areas.team.data.TeamMembers;
import zhu.areas.team.data.TeamNotice;

public class TeamZhServiceImpl implements ITeamZhService {
	private ITeamZhDAO teamZhDAO;
	
	public Team findByTeamId(String propertyName,int id){
		
		return teamZhDAO.findByProperty(propertyName,id);
	}

	public List<TeamMembers> findMembersByTeamId(String propertyName,int id){
		
		return (List<TeamMembers>) teamZhDAO.findMeByTeamId(propertyName,id);

	}
	public TeamNotice findTopNoticeByTeamId(String propertyName,int id){
		return (TeamNotice) teamZhDAO.findTopNotice(propertyName,id);
	}
	public void saveOrUpdateteaminfo(Team team){
		 teamZhDAO.saveOrUpdateteaminfo(team);
	}
	public void deleteteam(Team team){
		teamZhDAO.delete(team);
	}
	public void savepubteamnotice(TeamNotice teamNotice){
		teamZhDAO.save(teamNotice);
	}

	public ITeamZhDAO getTeamZhDAO() {
		return teamZhDAO;
	}

	public void setTeamZhDAO(ITeamZhDAO teamZhDAO) {
		this.teamZhDAO = teamZhDAO;
	}

}
